package com.primb.bench.project.search.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.primb.baselibs.util.FormatUtils;

import java.util.Date;

/**
 * Created by Chen on 2017/7/25.
 * 功能描述：
 */

public class RequestPriceEntity implements Parcelable {
    int start = 0;
    int limit = 20;
    int page = 0;
    String startDate  = FormatUtils.formatDate(new Date(), "-");
    String endDate;
    String custId;
    String custName;
    String priceType;
    String lnTrem;
    String tremUtil;
    String orgId;
    String orgName;
    String productId;
    String lnPrdId;
    String lnPrdName;

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getLnPrdId() {
        return lnPrdId;
    }

    public void setLnPrdId(String lnPrdId) {
        this.lnPrdId = lnPrdId;
    }

    public String getLnPrdName() {
        return lnPrdName;
    }

    public void setLnPrdName(String lnPrdName) {
        this.lnPrdName = lnPrdName;
    }

    public int getStart() {
        return start;
    }

    public int getLimit() {
        return limit;
    }

    public void rePage() {
        this.page = 0;
        this.start = 0;
    }

    public void reSet() {
        this.page = 0;
        this.start = 0;
        this.startDate = FormatUtils.formatDate(new Date(), "-");
    }

    public void setPageAdd() {
        this.page++;
        this.start = limit * page;
    }

    public void setPageReduce() {
        this.page--;
        this.start = limit * page;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getCustId() {
        return custId;
    }

    public void setCustId(String custId) {
        this.custId = custId;
    }

    public String getCustName() {
        return custName;
    }

    public void setCustName(String custName) {
        this.custName = custName;
    }

    public String getPriceType() {
        return priceType;
    }

    public void setPriceType(String priceType) {
        this.priceType = priceType;
    }

    public String getLnTrem() {
        return lnTrem;
    }

    public void setLnTrem(String lnTrem) {
        this.lnTrem = lnTrem;
    }

    public String getTremUtil() {
        return tremUtil;
    }

    public void setTremUtil(String tremUtil) {
        this.tremUtil = tremUtil;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public RequestPriceEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.start);
        dest.writeInt(this.limit);
        dest.writeInt(this.page);
        dest.writeString(this.startDate);
        dest.writeString(this.endDate);
        dest.writeString(this.custId);
        dest.writeString(this.custName);
        dest.writeString(this.priceType);
        dest.writeString(this.lnTrem);
        dest.writeString(this.tremUtil);
        dest.writeString(this.orgId);
        dest.writeString(this.orgName);
        dest.writeString(this.productId);
        dest.writeString(this.lnPrdId);
        dest.writeString(this.lnPrdName);
    }

    protected RequestPriceEntity(Parcel in) {
        this.start = in.readInt();
        this.limit = in.readInt();
        this.page = in.readInt();
        this.startDate = in.readString();
        this.endDate = in.readString();
        this.custId = in.readString();
        this.custName = in.readString();
        this.priceType = in.readString();
        this.lnTrem = in.readString();
        this.tremUtil = in.readString();
        this.orgId = in.readString();
        this.orgName = in.readString();
        this.productId = in.readString();
        this.lnPrdId = in.readString();
        this.lnPrdName = in.readString();
    }

    public static final Creator<RequestPriceEntity> CREATOR = new Creator<RequestPriceEntity>() {
        @Override
        public RequestPriceEntity createFromParcel(Parcel source) {
            return new RequestPriceEntity(source);
        }

        @Override
        public RequestPriceEntity[] newArray(int size) {
            return new RequestPriceEntity[size];
        }
    };
}
